Example Code

NI-5640R Instrument Driver API Examples for the Modulation Toolkit

Code and Documents

Attachment

The LabVIEW VIs included with this set will help you learn how to work with the combination of LabVIEW, the Modulation Toolkit and the NI-5640R using the Instrument Driver personality of the NI-5640R—i.e. using the NI-5640R as a device with 2 synchronized input and two synchronized outputs that can DMA data to and from the host PC. In this configuration, signal processing is applied on the host and not on the FPGA.

The VIs include matched transmitter / receiver pairs that can be loaded and run concurrently in LabVIEW. The default parameters (front panel controls) for the paired VIs are set so that the transmitted signal can be fed back into the receiver and demodulated as expected with the AO transmit and AI receive connectors on the NI-5640R are connected in loopback. For instance, to generate and receive a QAM modulated signal, you can load and run the following example VIs:

  • <NewFolder>\examples\Modulation \ni5640R examples\Transmit\MT 5640R Generate QAM.vi

  • <New Folder>\ examples\Modulation \ni5640R examples \MT 5640R QAM Demod.vi

where <New Folder> is the installation folder that you chose when you installed these examples.

Requirements

  • National Instruments LabVIEW 8.5 (Full, Pro, Student, or Evaluation editions)

  • Modulation Toolkit 4.0 (or higher)

  • NI-5640R 1.2 (Device Driver)

  • Installed / configured NI PCI-5640R hardware

Installing and working with these examples

  • These preliminary examples do not include a formal, automated installer.

  • Ensure that your PC meets the system requirements mentioned above.

  • To install the examples, unzip the ni5640RMTexamples.zip file into a new folder. Doing so will create new subfolders that contain the examples:

    • <New Folder>\examples\Modulation \ni5640R examples \Transmit

    • <New Folder>\examples\Modulation \ni5640R examples \Receive

where <New Folder> is the name of the new folder.

Additional Resources

  • The PDF manuals / online help installed with the NI-5640R driver or available online ()

  • The IF-RIO support forum()

Sam Shearman

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Ujjval Shah
Member
Member
on

is it possible to generate symbol rate (with 16 samples per symbol) less than 50K with a frequency deviation (in FSK transmit) of less than 50K?

(MT 5640R Generate FSK.vi)

When the symbol rate and frequency deviation is greater than 50K it works like a charm (measured on spectrometer)

but whenever the values are less than 50K the Actual symbol rate gets coerced to 50k and also the bandwidth of the signal reamins at 50K.

Initially it was thought of that this might be happening because the IFRIO may not be able to generate samples at a rate below 50K*16.

So the waveform was resampled using MT Resample waveform vi with 50k*16 as input to desired sample rate.

The problem persisted. Different sampling rates were also tried out but without any help.

Can anyone please tell me what can be the reason for this?

Thanks.

Regards,

Ujjval

sshearman
Member
Member
on

Hi,

It is possible to generate lower symbol rate FSK signals, but you'll need to do some combination of

  • increasing the samples/symbol parameter
  • decreasing the PN Sequence order

to do so. For instance, I was able to get an effective symbol rate of 10.1k and a bandwidth of 25k or so with 90 samples / symbol and deviation of FSK 5k.

The reason is somewhat difficult to explain because it is related to a number of interelated factors:

  • The example generates a phase continuous signal, which has a minimum number of symbols designated by the PN order
  • Reducing the symbol rate will increase the required time duration of a phase continuous signal to transmit
  • The size of the output sample buffer is finite, so Lower DAC sample rates allow longer time duration signals for transmit.
  • The sample clock for the 5640R has a minimum of about 25k

I hope this helps!

--Sam

Sam Shearman
Contributors